GET IMAGE

This command will copy a selected area of the current bitmap.

  Syntax
GET IMAGE Image Number, Left, Top, Right, Bottom
GET IMAGE Image Number, Left, Top, Right, Bottom, Texture Flag
  Parameters
Image Number
Integer
What image number to use
Left
Integer
Image to grab left side position
Top
Integer
Image to grab top most position
Right
Integer
Image to grab right side position
Bottom
Integer
Image to grab bottom most position
Texture Flag
Integer
The value of the texture flag to use (0-use stretching, filter, colorkey, or 1-no stretching, no filter, colorkey, or 2-use stretching, no filter, no colorkey, or 3-no stretching, no filter, no colorkey

  Returns

This command does not return a value.

  Description

Amongst other things, you can use this command to store sequences of image data and provide animations for sprites. When images are grabbed, they are stored in memory and do not require the bitmap from which the image was taken. The parameters should be specified using integer values. You cannot grab an image while the target pixels are being locked by the LOCK PIXELS command, as it is not possible to read from a surface that is using the fast write only lock method on the pixels. Use the following texture flags:

0-use stretching, filter, colorkey
1-no stretching, no filter, colorkey
2-use stretching, no filter, no colorkey (grab from alpha bitmap retain alpha channel)
3-no stretching, no filter, no colorkey (grab from alpha bitmap retain alpha channel)

  Example Code
get image 1,0,0,100,100,0
cls
paste image 1,100,100,0
do
loop
end
  See also

IMAGE Commands Menu
Index